home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Toolbox / Password / Read Me - Password < prev   
Encoding:
Text File  |  1996-09-17  |  1.3 KB  |  38 lines  |  [TEXT/CWIE]

  1. This is a simple demo of three ways to implement a password dialog, where
  2. characters typed are not drawn; instead, anonymous characters such as
  3. bullets are drawn, keeping the password secure.
  4.  
  5. The methods have various pros and cons:
  6.  
  7. Two Items:
  8.   + No need to maintain internal buffer
  9.   + No nasty extra fonts
  10.   - Requires another edit text item for each password item
  11.   - Requires relatively complex dialog filter.
  12.  
  13. Different font:
  14.   + Very simple to use
  15.   + Works properly with System 7's hacks for cut/copy/paste in dialogs
  16.   - Requires a special font in your application (which has been known to
  17.     cause problems, such as ID conflicts)
  18.   - Requires that you make all your static text items UserItems with their
  19.     own drawing procedure, plus you cannot have any non-password edittext
  20.     items.
  21.  
  22. Internal Buffer:
  23.   + Works well, is fairly clean
  24.   - Requires you to do some of the work of TextEdit (inserting, deleting
  25.     characters).
  26.  
  27. I haven't implemented a fourth method, which I've seen used, which replaces
  28. the QuickDraw bottleneck for text in the dialog, and then changes all text
  29. drawn within the appropriate edit text item to little squares.
  30.  
  31. All the interesting code is in Password.c- Sample.c is just the application
  32. shell, and it's just a copy of the CSample code with most of the Traffic
  33. Light stuff hacked out.
  34.  
  35. Enjoy.
  36. Tim Dierks
  37. UK Mac DTS
  38.